The sync program re-synchronizes an already existing subject with the
same UUID but a new name (a Keycloak rename). Because the sync program
cannot know whether this backend already has the subject, adding and
renaming are the same idempotent upsert: it updates the name in place,
creates no second subject, and replaying the identical request is a
no-op — all returning 200 OK.
SubjectSync: sync-alice from 9031:
A Global Admin Can Synchronize a New User Subject| name | value |
|---|---|
| subjectUuid | 238a0001-0000-0000-0000-000000000001 |
| subjectType | USER |
| newSubjectName | sync-alicia |
HTTP PUT "/api/rbac/subjects/238a0001-0000-0000-0000-000000000001" // SubjectSync: sync-alice \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }` \
-H 'Content-Type: application/json' \
--data-binary @- <<EOF
{
"name" : "sync-alicia",
"type" : "USER"
}
EOF
=> status: 200 OK
HTTP PUT "/api/rbac/subjects/238a0001-0000-0000-0000-000000000001" // SubjectSync: sync-alice \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }` \
-H 'Content-Type: application/json' \
--data-binary @- <<EOF
{
"name" : "sync-alicia",
"type" : "USER"
}
EOF
=> status: 200 OK
HTTP GET "/api/rbac/subjects?name=sync-alicia" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }`
=> status: 200 OK
[ {
"uuid" : "238a0001-0000-0000-0000-000000000001", // SubjectSync: sync-alice
"name" : "sync-alicia",
"type" : "USER"
} ]
generated on 2026-07-17 01:44:28 for branch